package com.wmx.repository.impl;

import com.wmx.repository.EmpDao;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.sql.Connection;
import java.util.List;
import java.util.Map;

/**
 * 员工信息 - 持久层
 *
 * @author wangMaoXiong
 * @version 1.0
 * @date 2023/12/19 10:39
 */
@Repository
public class EmpDaoImpl implements EmpDao {

    @Resource
    private JdbcTemplate jdbcTemplate;

    @Override
    public List<Map<String, Object>> findAll() {
        String sql = "select * from emp";
        return jdbcTemplate.queryForList(sql);
    }

}
